/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pes_soft.demo.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
	@Autowired
	private RpcServiceGateway rpcServiceGateway;

	@RequestMapping("/consume")
	public String consume() {
		return rpcServiceGateway.zooKeeperProviderClient().serverProvider();
	}
	
	@RequestMapping("/hello")
	public String hello() {
		return rpcServiceGateway.zooKeeperProviderClient().hello("张三");
	}
}